#include <iostream>
using namespace std;
int main()
{
    string s;
    cin>>s;
    int cLen = 0;
    int qLen = 0;
    int uLen = 0;

    for(int i = 0; i<s.length(); i++)
    {
        if(s[i] =='c' || s[i] == 'C')
            cLen++;
        if(s[i] =='q' || s[i] == 'Q')
            qLen++;
        if(s[i] =='u' || s[i] == 'U')
             uLen++;
    }
    
    for(int i = 0; i<s.length(); i++)
    {
        if(cLen>0) cout<<"C"; cLen --;
        if(qLen>0) cout<<"Q"; qLen--;
        if(uLen>0) cout<<"U"; uLen--;
    
    }
}